From: Florian Müllner Date: Sun, 15 Mar 2020 22:41:27 +0000 (+0100) Subject: extensionDownloader: Only check server if there's something to update X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~751^2^2~131 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=69ea038a8ff46fa7b8ce8d5ba75b3930b753d8a0;p=gnome-shell.git extensionDownloader: Only check server if there's something to update checkForUpdates() will currently always query the server for updates, even when passing an empty vardict of installed extensions. We know there won't be any updates in that case, so avoid a pointless network request. https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1100 --- diff --git a/js/ui/extensionDownloader.js b/js/ui/extensionDownloader.js index 5f6e74b09..be7426be0 100644 --- a/js/ui/extensionDownloader.js +++ b/js/ui/extensionDownloader.js @@ -127,6 +127,9 @@ function checkForUpdates() { metadatas[uuid] = extension.metadata; }); + if (Object.keys(metadatas).length === 0) + return; // nothing to update + let versionCheck = global.settings.get_boolean( 'disable-extension-version-validation'); let params = {